set ws=WScript.CreateObject("WScript.Shell")
dim cmd
cmd=""
cmd=cmd + "wsl -d Ubuntu-20.04 -u root echo -e ""[network]\ngenerateResolvConf = false\n"">/etc/wsl.conf;"
cmd=cmd + "ip addr del $(ip addr show eth0 | grep 'inet\b' | awk '{print $2}' | head -n 1) dev eth0;" 
cmd=cmd + "ip addr add 192.168.50.2/24 broadcast 192.168.50.255 dev eth0;"
cmd=cmd + "ip route add 0.0.0.0/0 via 192.168.50.1 dev eth0;"
cmd=cmd + "rm /etc/resolv.conf -rf;"
cmd=cmd + "echo -e ""nameserver 192.168.50.1\n"" > /etc/resolv.conf;"
ws.run cmd ,0
